<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ include file="../general/header.jsp" %>
<script type="text/javascript">$($.date_input.initialize);</script>
		<div id="header">FREE MARKET HOME PAGE</div>
		<%@ include file="../general/menu.jsp" %>		
		<form:form method="POST" action="${action}" commandName="reportForm">
		<form:input type="text" path="before" name="desde" class="date_input" value="${desde}"/>
		<form:errors path="before" /> 
		<form:input type="text" path="after" name="hasta" class="date_input" value="${hasta}"/>
		<form:errors path="after" />
		<input type="submit">
		
		</form:form>
		<h2>Income Report</h2>
		<table class="listas">
			<tr style="font-weight:bold;"> 
				<td> Period </td>
				<td> Income </td>
			</tr>
			<c:forEach var="income" items="${incomes}">
				<tr>
					<td> <c:out value="${income.period}" /> </td> 
					<td> <c:out value="${income.income}" /> </td> 
				</tr>
			</c:forEach>
			<c:if test="${!empty errors}">
				<c:out value="${errors}" />
		</c:if>
		</table>		
		<div id="bottom">
	<span class="inline spaced">
		<a class="color" href="../general/index">Go back to index</a>
	</span>
</div>		
<%@ include file="../general/footer.jsp" %>